package org.example.service;

import jakarta.annotation.Resource;
import org.example.dao.IBusinessRepository;
import org.example.entity.Business;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BusinessService { //service可以抽象成接口
    @Resource
    private IBusinessRepository businessRepository;
    public List<Business> findAllBusinessByType(Integer type){
        return businessRepository.findAllByOrderTypeId(type);
    }
    public Business findBusinessById(String id){
        return businessRepository.findByBusinessId(id);
    }

}
